import Vue from "vue";
import "./elInstall";
import store from "./store";
import Storage from "vue-ls";
import JeecgComponents from "./components/jeecg/index";
// import ElementUI from "element-ui";
import config from "./defaultSettings";
// import "element-ui/lib/theme-chalk/index.css";

import modelDesigner from "./views/flowable/model/modelDesigner.vue";

Vue.config.productionTip = false;

Vue.use(Storage, config.storageOptions);
Vue.use(JeecgComponents);
// Vue.use(ElementUI);

function renderModelDesigner({
  containerSel,
  height,
  bpmnXml,
  data = {},
  headers = {},
}) {
  store.state.headers = headers;
  new Vue({
    store,
    render: (h) =>
      h(modelDesigner, {
        props: { height, bpmnXml, data },
      }),
  }).$mount(containerSel);
}

export { renderModelDesigner };
